package exception;

import java.io.FileNotFoundException;

public class ThrowDemo {
    public static void main(String[] args) {

        Student zs = new Student();
        try {
            zs.setAge(10);
        } catch ( IllegalAgeException e) {

            System.out.println("出现问题并解决了");
        }
        System.out.println("学生年龄为" + zs.getAge());






















           // System.out.println("输入年龄有误");


    }



}
